package com.tyqx.apiutil.common;

import java.util.List;

/**
 * Created by sam on 2018/2/9.
 */
public class BackendPage<T> {
    //状态吗
    private Integer code;
    //消息
    private String msg;
    //总记录数
    private Integer count;
    //   数据
    private List<T> data;

    public BackendPage() {

    }

    public BackendPage(Integer count, List<T> data) {
        this.code = 0;
        this.msg = "";
        this.count = count;
        this.data = data;
    }

    public BackendPage(String msg) {
        this.code = 500;
        this.msg = msg;
        this.count = 0;
        this.data = null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }
}
